package sanrenxing.dayEnd.backRepertoryTotal.dao;

import org.apache.ibatis.annotations.Select;
import sanrenxing.dayEnd.backRepertoryTotal.domain.FundSum;

import java.util.List;

public interface FundSumDao {

    @Select("select sts.seId,fs.seName,sts.secNum,sts.costs,sts.sumMoney,md.closePrice,(sts.sumMoney/ws.netAsset)*100 as money from \n" +
            "securitiesStock sts join financialsecurities fs on sts.seId=fs.seId join marketData md on md.seId=sts.seId join worthStatistics ws on 1=1 where to_char(ws.netDate,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')")
    public List<FundSum> selectByPage(int start,int end);

    @Select("select count(*) from \n" +
            "securitiesStock sts join financialsecurities fs on sts.seId=fs.seId join marketData md on md.seId=sts.seId join worthStatistics ws on 1=1 where to_char(ws.netDate,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')")
    public int count();

}
